// 弹性布局
@mixin flex($direction: row, $justify: flex-start, $align: stretch) {
  display: flex;
  flex-direction: $direction;
  justify-content: $justify;
  align-items: $align;
}

// 文本溢出省略
@mixin ellipsis($lines: 1) {
  @if $lines == 1 {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  } @else {
    display: -webkit-box;
    -webkit-line-clamp: $lines;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
}

// 响应式
@mixin respond-to($breakpoint) {
  @if $breakpoint == xs {
    @media (max-width: $screen-xs) { @content; }
  }
  @else if $breakpoint == sm {
    @media (min-width: $screen-sm) { @content; }
  }
  @else if $breakpoint == md {
    @media (min-width: $screen-md) { @content; }
  }
  @else if $breakpoint == lg {
    @media (min-width: $screen-lg) { @content; }
  }
  @else if $breakpoint == xl {
    @media (min-width: $screen-xl) { @content; }
  }
}

// 过渡动画
@mixin transition($property: all, $duration: 0.3s, $timing: ease-in-out) {
  transition: $property $duration $timing;
}

// 阴影效果
@mixin box-shadow($level: 1) {
  @if $level == 1 {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  }
  @else if $level == 2 {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  }
  @else if $level == 3 {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
  }
} 